{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <!--
    width=device-width假设网站将被带有不同屏幕分辨率的设备浏览,可以确保它能正确呈现在不同设备上
    initial-scale=1.0 确保网页加载时，以 1:1 的比例呈现，不会有任何的缩放
    maximum-scale=1.0 与 user-scalable=no 一起使用。这样禁用缩放功能后，用户只能滚动屏幕
    <img src="..." class="img-responsive" alt="响应式图像">
    -->
    <title>分页查询</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap-theme.min.css' %}">
    <link rel="stylesheet" href="{% static 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css' %}">
    <link rel="stylesheet" href="{% static 'umeditor/themes/default/css/umeditor.css' %}" type="text/css">
    <link rel="stylesheet" href="{% static 'bootstrap-fileinput/css/fileinput.min.css' %}">

    <script src="{% static 'js/jquery.min.js' %}"></script>
    <script src="{% static 'js/util/myUtil.js' %}"></script>
    <script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
    <script src="{% static 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js' %}"></script>
    <script src="{% static 'bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js' %}"></script>
    <script src="{% static 'bootstrap-fileinput/js/fileinput.min.js' %}"></script>
    <script src="{% static 'bootstrap-fileinput/js/locales/zh.js' %}"></script>
    <script type="text/javascript" charset="utf-8" src="{% static 'umeditor/umeditor.config.js' %}"></script>
    <script type="text/javascript" charset="utf-8" src="{% static 'umeditor/umeditor.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'umeditor/lang/zh-cn/zh-cn.js' %}"></script>

    <script>
        introduceuEditor = undefined
        studentId = undefined
        $(function(){
            /*
            监听添加或查询按钮面板打开事件
                1)实例化日期插件和百度编辑器插件
                2)如果是查询还需要查询当前信息并赋值到表单中
             */
            $('#insertModel').on('show.bs.modal',function(){
                $('.form_dates').datetimepicker({
                    language:  'zh-CN',
                    weekStart: 1,
                    todayBtn:  1,
                    autoclose: 1,
                    todayHighlight: 1,
                    startView: 2,
                    minView: 2,
                    forceParse: 0
                });
                introduceuEditor = UM.getEditor('introduce',{
                    textarea:'introduce',
                    initialFrameWidth: null,
                    wordCount: true,
                    autoClearinitialContent:true,
                    autoHeightEnabled: false,
                    initialFrameHeight: 180,
                    zIndex: 1100,
                    autoFloatEnabled: false,
                    enableContextMenu: false,
                    enableAutoSave: false,
                    emotionLocalization: true, //确保dialogs/emotion下存在对应的images文件夹及表情文件
                })
                //studentId!=undefined表示修改操作
                if(studentId!=undefined){
                    $.ajax({
                        async: true,
                        cache: false,
                        type: "POST",
                        url: "{% url 'student:select' %}",
                        dataType: "json",
                        data: {"studentId":studentId},
                        beforeSend:function(xhr,settings){xhr.setRequestHeader("X-CSRFToken","{{ csrf_token }}")},
                        error:function(XMLHttpRequest, textStatus, errorThrown){alert("系统错误,请联系管理员!")},
                        success:function(data, textStatus, jqXHR){
                            if(data.student){
                                //文本框赋值
                                $("input[id='id']").attr("value",data.student.pk)
                                $("input[id='num']").attr("value",data.student.fields.num)
                                $("input[id='name']").attr("value",data.student.fields.name)
                                //单选按钮赋值
                                var stu_sex = data.student.fields.sex
                                if(stu_sex=="male"){
                                    $("input[id='sex1']").attr("checked",true)
                                    $("input[id='sex2']").removeAttr("checked")
                                }
                                if(stu_sex=="female"){
                                    $("input[id='sex2']").attr("checked",true)
                                    $("input[id='sex1']").removeAttr("checked")
                                }
                                //复选框赋值
                                var stu_hobby = data.student.fields.hobby
                                if(stu_hobby.indexOf("option1")>=0){
                                    $("input[id='hobby1']").attr("checked",true)
                                }else{
                                    $("input[id='hobby1']").removeAttr("checked")
                                }
                                if(stu_hobby.indexOf("option2")>=0){
                                    $("input[id='hobby2']").attr("checked",true)
                                }else{
                                    $("input[id='hobby2']").removeAttr("checked")
                                }
                                if(stu_hobby.indexOf("option3")>=0){
                                    $("input[id='hobby3']").attr("checked",true)
                                }else{
                                    $("input[id='hobby3']").removeAttr("checked")
                                }
                                //给下拉框赋值
                                var stu_isaccommodation = data.student.fields.isaccommodation
                                if(stu_isaccommodation){
                                    $("select[id='isaccommodation']").find("option[value='1']").attr("selected",true).siblings().removeAttr("selected")
                                }
                                $("input[id='registered']").attr("value",data.student.fields.registered)
                                $("input[id='registered_']").attr("value",data.student.fields.registered)
                                //百度编辑器赋值
                                {#$("form[id='save_studnet'] textarea[id='introduce']").text(data.fields.introduce)#}
                                if(data.student.fields.introduce != null){
                                    setTimeout(function(){
                                        introduceuEditor.setContent(data.student.fields.introduce,false)
                                    },1000)
                                }
                                //头像
                                $("#imageForm").css("display","block")
                                var imageSrc = "{{ MEDIA_URL }}"+data.student.fields.image
                                $("#image").fileinput({
                                    language: 'zh',
                                    uploadUrl: "{% url 'student:insertImage' %}",
                                    uploadExtraData: {"id":studentId},
                                    maxFileSize : 5024,
                                    maxFileCount: 1,
                                    showUpload: false, //是否显示上传按钮
                                    showRemove: false, //是否显示移除按钮
                                    showClose: false, //关闭文件预览关闭按钮
                                    autoReplace: true, //是否自动替换当前文件
                                    initialCaption: "请选择您的头像",
                                    elErrorContainer: '#image-file-errors', //错误提示信息容器
                                    dropZoneTitle: "拖拽头像图片到这里,一次只能一张图片",
                                    initialPreviewAsData: true,
                                    initialPreview: imageSrc, //初始化头像路径
                                    initialPreviewDownloadUrl: imageSrc, //初始化下下载缩略图按钮
                                    initialPreviewConfig: [

                                    ],
                                    layoutTemplates: { //预览文件按钮组
                                        actions: '<div class="file-actions">\n' +
                                            '    <div class="file-footer-buttons">\n' +
                                            '        {download}' +
                                            '    </div>\n' +
                                            '    {drag}\n' +
                                            '    <div class="clearfix"></div>\n' +
                                            '</div>',
                                        actionZoom: '',
                                        actionDrag: ''
                                    },
                                    allowedFileTypes: ["image"],
                                    allowedFileExtensions: ["jpg", "png", "gif"],
                                    allowedPreviewTypes: ['image'],
                                }).on('fileselect', function(event, numFiles, label) {
                                    if(label.indexOf("jpg")>=0 || label.indexOf("png")>=0 || label.indexOf("gif")>=0){
                                        $('#image').fileinput('upload')
                                    }
                                }).on('filepreupload', function(event, data, previewId, index){
                                    data.jqXHR.setRequestHeader("X-CSRFToken","{{ csrf_token }}")
                                }).on('fileuploaded', function(event, data, previewId, index) {
                                    if(data.response && data.response.status=="success"){
                                        alert("头像上传成功！")
                                    }
                                })
                                //视频
                                $("#videoForm").css("display","block")
                                var initialPreview = []
                                var initialPreviewConfig = []
                                $.each(data.student_videos,function(index,value){
                                    var videoSrc = "{{ MEDIA_URL }}"+value.fields.video
                                    initialPreview.push(videoSrc)
                                    initialPreviewConfig.push({
                                            type: "video",
                                            //size: 375000,
                                            filetype: "video/mp4",
                                            //caption: "KrajeeSample.mp4",
                                            //filename: 'KrajeeSample.mp4'
                                            downloadUrl: videoSrc,
                                            url: "{% url 'student:deleteVideo' %}",
                                            key: value.pk,
                                    })
                                })
                                $("#video").fileinput({
                                    language: 'zh',
                                    uploadUrl: "{% url 'student:insertVideo' %}",
                                    uploadExtraData: {"id":studentId},
                                    maxFileSize : 10240,
                                    maxFileCount: 2,
                                    validateInitialCount: true,
                                    showUpload: false,
                                    showRemove: false,
                                    showClose: false,
                                    initialCaption: "请选择您的视频,最多2个",
                                    overwriteInitial: false, //不覆盖已经存在的图片
                                    elErrorContainer: '#video-file-errors', //错误提示信息容器
                                    dropZoneTitle: "拖拽视频到这里,支持多视频同时上传",
                                    initialPreviewAsData: true,
                                    initialPreview: initialPreview, //初始化头像路径
                                    initialPreviewConfig:initialPreviewConfig,
                                    layoutTemplates: {
                                        actions: '<div class="file-actions">\n' +
                                        '    <div class="file-footer-buttons">\n' +
                                        '        {upload} {delete}' +
                                        '    </div>\n' +
                                        '    {drag}\n' +
                                        '    <div class="clearfix"></div>\n' +
                                        '</div>',
                                        actionDownload: '',
                                        actionZoom: '',
                                        actionDrag: ''
                                   },
                                    allowedFileTypes: ['video', 'audio', 'flash'],
                                    allowedFileExtensions: ["mp4"],
                                    allowedPreviewTypes: ['video', 'audio', 'flash'],
                                }).on('filepreupload', function(event, data, previewId, index){
                                    data.jqXHR.setRequestHeader("X-CSRFToken","{{ csrf_token }}")
                                }).on('fileuploaded', function(event, data, previewId, index){
                                    console.info(data)
                                    if(data.response && data.response.status=="success"){
                                        alert("视频上传成功！")
                                    }else{
                                        alert("视频上传失败！")
                                    }
                                }).on('filepredelete', function(event, key, jqXHR, data){
                                    jqXHR.setRequestHeader("X-CSRFToken","{{ csrf_token }}")
                                }).on('filedeleted', function(event, key, jqXHR, data){
                                    if(jqXHR.responseJSON.status=="success"){
                                         alert("视频删除成功")
                                    }else{
                                        alert("视频删除失败")
                                    }
                                })
                            }else{alert("查询失败,请稍后再试!")}
                        }
                    })
                }else{//添加操作,添加界面不提供上传头像和视频
                    $("#imageForm").css("display","none")
                    $("#videoForm").css("display","none")
                }
            })
            /*
            监听添加或查询面板关闭事件
                1、清空表单信息
                2、刷新当前页面
             */
            $('#insertModel').on('hidden.bs.modal',function(){
                resetInsertForm()
                window.location.reload()
            })
        })
        // 1.1打开添加面板
        function openInsertModel(){
            studentId = undefined
            $("#insertModel").modal({
                keyboard: true,
                backdrop: true,//默认显示模态框背景阴影
            })
        }
        // 1.2打开修改面板
        function openModifyModel(parm){
            studentId = parm
            $("#insertModel").modal({
                keyboard: true,
            })
        }
        // 1.3点击添加面板或查询面板中的保存按钮
        function save_(){
            //禁用模态框中的提交按钮,防止重复提交
            $(".modal-footer button:last").addClass("disabled")
            $("#save_studnet").submit()
        }
        // 1.4检查表单字段
        function checkInsertForm(){
            if(!checkByReg(/^310[0-9]{5}$/,"num","学号输入有误!")){return false}
            if(!checkByReg(/[\u4E00-\u9FA5]{2,5}(?:·[\u4E00-\u9FA5]{2,5})*/,"name","姓名输入有误!")){return false}
            var hobbys =[]
            $("input[name='hobby']:checked").each(function(){
                hobbys.push($(this).val())
            })
            if(hobbys.splice(",").length==0){
                $("#hobby1").parent().parent().addClass("has-error").removeClass("has-success")
                return false
            }else{
                $("#hobby1").parent().parent().removeClass("has-error").addClass("has-success")
            }
            if(!checkByReg(/^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/,"registered_","时间格式输入有误!")){return false}
            modify("{% url 'student:modify' %}",$("#save_studnet").serializeFromToObject())
        }
        // 1.5ajax提交表单信息
        function modify(url,values){
            $.ajax({
                async: true,
                cache: false,
                type: "POST",
                url: url,
                dataType: "json",
                data: values,
                beforeSend:function(xhr,settings){xhr.setRequestHeader("X-CSRFToken","{{ csrf_token }}")},
                error:function(XMLHttpRequest, textStatus, errorThrown){alert("系统错误,请联系管理员!")},
                success:function(data, textStatus, jqXHR){
                    if(data.status == "success"){
                        if(studentId==undefined){
                            alert("添加成功!")
                            resetInsertForm()
                        }else{
                            alert("修改成功!")
                            $(".modal-footer button:last").removeClass("disabled")
                        }
                    }else{
                        alert("操作失败,请稍后再试!")
                    }
                }
            })
        }
        // 2打开删除面板
        function openDeleteModel(parm){
            studentId = parm
            $("#deleteModel").modal({
                keyboard: true,
            })
        }
        // 2.1ajax删除信息
        function delete_(){
            $.ajax({
                async: true,
                cache: false,
                type: "POST",
                url: "{% url 'student:delete' %}",
                dataType: "json",
                data: {"studentId":studentId},
                beforeSend:function(xhr,settings){xhr.setRequestHeader("X-CSRFToken","{{ csrf_token }}")},
                error:function(XMLHttpRequest, textStatus, errorThrown){alert("系统错误,请联系管理员!")},
                success:function(data, textStatus, jqXHR){
                    if(data.status == "success"){
                        $('#deleteModel').modal('hide')
                        {#window.location.href="{% url 'student:page' %}"#}
                        window.location.reload()
                    }else{
                        alert("删除失败,请稍后再试!")
                    }
                }
            })
        }
        // 3打开修改头像面板,每次打开模态框时先清除上一次选择的文件上传框,然后再动态添加新的上传框并调用初始化的方法
        function openImageModel(parm,parm2){
            $("#imageModel").modal({
                keyboard: true,
            })
        }
        // 4打开修改视频面板
        function openVideoModel(parm,parm2){
            studentId = parm
            $("#videoModel").modal({
                keyboard: true,
            })
        }
        //重置分页查询表单
        function resetKewardsForm(){
            document.getElementById("kewards_studnet").reset()
            $("form[id='kewards_studnet'] input:gt(0)").attr("value","")
            $("form[id='kewards_studnet'] select").find("option[value='']").attr("selected",true).siblings().removeAttr("selected")
            $("#kewards_studnet").submit()
        }
        //重置添加表单或修改表单
        function resetInsertForm(){
            {#重置手动填写的字段#}
            document.getElementById("save_studnet").reset()
            {#重置系统赋值的字段#}
            $("input[id='id']").attr("value","")
            $("input[id='num']").attr("value","")
            $("input[id='name']").attr("value","")
            $("input[id='sex1']").attr("checked",true)
            $("input[id='sex2']").removeAttr("checked")
            $("input[id='hobby1']").attr("checked",true)
            $("input[id='hobby2']").removeAttr("checked")
            $("input[id='hobby3']").removeAttr("checked")
            $("select[id='isaccommodation']").find("option[value='0']").attr("selected",true)
            $("select[id='isaccommodation']").find("option[value='1']").removeAttr("selected")
            $("input[id='registered']").attr("value","")
            $("input[id='registered_']").attr("value","")
            introduceuEditor.setContent(""){#$("form[id='save_studnet'] textarea").text("")#}
            $("img[id='imghead']").attr("src","{% static 'images/photo_icon.png' %}")
            {#样式重置#}
            $("form[id='save_studnet'] input").parent().removeClass("has-success").removeClass("has-error")
            $("#hobby1").parent().parent().removeClass("has-error").removeClass("has-success")
            $(".modal-footer button:last").removeClass("disabled")
        }
        //正则校验
        function checkByReg(reg,id,message) {
            var value = $("#"+id).val()
            if(value != undefined && value != null && reg.test(value)){
                $("#"+id).parent().removeClass("has-error").addClass("has-success")
                return true
            }else{
                $("#"+id).parent().addClass("has-error").removeClass("has-success")
                return false
            }
        }
    </script>
</head>
<body>
<div class="table-responsive">
    <table class="table table-bordered table-hover table-striped">
        <caption class="text-center">
            <div style="font-size:40px;">2017级入学信息</div>
            {#搜索表单#}
            <div class="text-left" style="margin-top:5px;margin-bottom:5px;">
                <form class="form-inline" role="form" id="kewards_studnet" method="post" action="{% url 'student:page' %}">
                    {% csrf_token %}
                    <div class="form-group">
                        <label class="control-label" for="kewards_num">学号:</label>
                        <input type="text" class="form-control input-sm" id="kewards_num" name="kewards_num" placeholder="请输入学号"
                           value="{% if kewards.num %}{{ kewards.num }}{% endif %}">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="num">姓名:</label>
                        <input type="text" class="form-control input-sm" name="kewards_name" id="kewards_name" placeholder="请输入姓名"
                           value="{% if kewards.name %}{{ kewards.name }}{% endif %}">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="kewards_sex">性别:</label>
                        <select class="form-control input-sm" name="kewards_sex" id="kewards_sex">
                            <option value="" {% ifequal kewards.sex ''%}selected{% endifequal %}>全部</option>
                            <option value="male" {% ifequal kewards.sex 'male'%}selected{% endifequal %}>男</option>
                            <option value="female" {% ifequal kewards.sex 'female'%}selected{% endifequal %}>女</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="kewards_isaccommodation">是否择校:</label>
                        <select class="form-control input-sm" name="kewards_isaccommodation" id="kewards_isaccommodation">
                            <option value="" {% ifequal kewards.isaccommodation ''%}selected{% endifequal %}>全部</option>
                            <option value="0" {% ifequal kewards.isaccommodation '0'%}selected{% endifequal %}>否</option>
                            <option value="1" {% ifequal kewards.isaccommodation '1'%}selected{% endifequal %}>是</option>
                        </select>
                    </div>
                    <button type="submit" class="btn btn-default btn-sm">查询</button>
                    <button type="button" class="btn btn-default btn-sm" onclick="resetKewardsForm();">清空</button>
                    <button type="button" class="btn btn-default btn-sm" onclick="openInsertModel();">添加</button>
                    <button type="button" class="btn btn-default btn-sm">导入</button>
                    <button type="button" class="btn btn-default btn-sm">导出</button>
                    <button type="button" class="btn btn-default btn-sm" onclick="window.location.reload();">刷新</button>
                </form>
            </div>
        </caption>
        <thead>
            <tr>
                <th>序号</th><th>学号</th><th>姓名</th><th>性别</th><th>特长</th><th>是否择校</th><th>入学时间</th><th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for object in objects.object_list %}
            <tr>
                <td>{{ forloop.counter }}</td>
                <td>{{ object.num }}</td>
                <td>{{ object.name }}</td>
                <td>{{ object.get_sex_display }}</td>
                <td>{{ object.hobby }}</td>
                <td>{{ object.get_isaccommodation_display }}</td>
                <td>{{ object.registered }}</td>
                <td>
                    <a class="label label-info" href="javascript:void(0);" onclick="openModifyModel('{{ object.id }}');">修改</a>
                    &nbsp;
                    <a class="label label-warning" href="javascript:void(0);" onclick="openDeleteModel('{{ object.id }}');">删除</a>
                </td>
            </tr>
            {% endfor %}
            <tr>
                <td colspan="10">
                    <ul class="pagination pagination-sm" style="display:block;margin:0;float:right;">
                        {#上一页#}
                        {% if objects.has_previous %}
                        <li><a href="?{{ objects.previous_page_number.querystring }}">&laquo;</a></li>
                        {% endif %}
                        {#中间页#}
                        {#{% if objects.object_list|length > 0 %}#}
                        {% for page in objects.pages %}
                            {% if page  %}
                                {% ifequal page objects.number %}
                                    <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>
                                {% else %}
                                    <li><a href="?{{ page.querystring }}">{{ page }}</a></li>
                                {% endifequal %}
                            {% else %}
                                <li><a href="#">...</a></li>
                            {% endif %}
                        {% endfor %}
                        {# {% endif %}#}
                        {#下一页#}
                        {% if objects.has_next %}
                            <li><a href="?{{ objects.next_page_number.querystring }}">&raquo;</a></li>
                        {% endif %}
                    </ul>
                </td>
            </tr>
        </tbody>
    </table>
</div>
{#添加学生信息弹框#}
<div class="modal fade" id="insertModel" tabindex="-1" role="dialog" aria-labelledby="insertTitle" aria-hidden="true">
    <div class="modal-dialog" style="width:80%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="insertTitle">添加学生信息</h4>
            </div>
            <div class="modal-body">
                {#添加表单#}
                <form class="form-horizontal" role="form" method="post" id="save_studnet" onsubmit="return checkInsertForm();" action="#">
                    <input type="hidden" name="id" id="id" value="">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="num">学号<strong style="color: red;">&nbsp;*&nbsp;</strong>:</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" name="num" id="num" placeholder="请输入学号" value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="name">姓名<strong style="color: red;">&nbsp;*&nbsp;</strong>:</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" name="name" id="name" placeholder="请输入姓名" value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">性别:</label>
                        <div class="col-sm-9">
                            <label class="checkbox-inline">
                                <input type="radio" name="sex" id="sex1" value="male" checked>男
                            </label>
                            <label class="checkbox-inline">
                                <input type="radio" name="sex" id="sex2" value="female">女
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">特长<strong style="color: red;">&nbsp;*&nbsp;</strong>:</label>
                        <div class="col-sm-9">
                            <label class="checkbox-inline">
                                <input type="checkbox" name="hobby" id="hobby1" value="option1" checked>足球</label>
                            <label class="checkbox-inline">
                                <input type="checkbox" name="hobby" id="hobby2" value="option2">篮球</label>
                            <label class="checkbox-inline">
                                <input type="checkbox" name="hobby" id="hobby3" value="option3">排球</label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否择校:</label>
                        <div class="col-sm-9">
                            <select class="form-control" name="isaccommodation" id="isaccommodation">
                                <option value="1">是</option>
                                <option value="0" selected>否</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">入学时间<strong style="color: red;">&nbsp;*&nbsp;</strong>:</label>
                        <div class="col-sm-9 input-group date form_dates" data-date="" data-date-format="yyyy-mm-dd" data-link-field="registered" data-link-format="yyyy-mm-dd" style="padding-left: 14px;padding-right: 14px;">
                            <input type="text" class="form-control" placeholder="请输入入学时间" name="registered_" id="registered_" disabled value="" style="background-color:#FFFFFF;">
                            {#<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>#}
                            <span class="input-group-addon" style="background-color:#FFFFFF;"><span class="glyphicon glyphicon-calendar"></span></span>
                        </div>
                        <input type="hidden" name="registered" id="registered" value="" /><br/>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">自我介绍:</label>
                        <div class="col-sm-9">
                            {#<textarea class="form-control" rows="3" name="introduce" id="introduce"></textarea>#}
                            <script type="text/plain" id="introduce" name="introduce"></script>
                        </div>
                    </div>
                </form>
                <form class="form-horizontal" role="form"  id="imageForm" style="display:none">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">头像:</label>
                        <div class="col-sm-9">
                            <input id="image" name="image" type="file" accept="image/*">
                            <div id="image-file-errors"></div>
                        </div>
                    </div>
                </form>
                <form class="form-horizontal" role="form"  id="videoForm" style="display:none">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">视频:</label>
                        <div class="col-sm-9">
                            <input id="video" name="video" type="file" accept="video/*" multiple>
                            <div id="video-file-errors"></div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="save_(this);">保存</button>
            </div>
        </div>
    </div>
</div>
{#删除学生信息弹框#}
<div class="modal fade" id="deleteModel" tabindex="-1" role="dialog" aria-labelledby="deleteTitle" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="deleteTitle">删除学生信息</h4>
			</div>
			<div class="modal-body">您确定要删除这条学生信息?</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary" onclick="delete_();">删除</button>
			</div>
		</div>
	</div>
</div>
</body>
</html>